import request from '@/utils/request'

const approve = {
  // 待我审批记录
  myApproveList(params) {
    return request.get('/kjsf/approve/myApproveList', {
      params
    })
  },
  // 我已审批记录
  myApprovedList(params) {
    return request.get('/kjsf/approve/myApprovedList', {
      params
    })
  },
  // 审批操作
  opApprove(data) {
    return request.post('/kjsf/approve/approve', data);
  },
  // 根据业务id获取该业务所有审批记录
  getByBusinessId(businessId) {
    return request.get(`/kjsf/approve/getByBusinessId/${businessId}`);
    // return request.get(`/kjsf/reportTrial/getByBusinessId/${businessId}`);
  },
  // 审批人员列表
  getApproverList(params) {
    return request.get('/kjsf/approveUser/list', { params })
  },
  // 添加形式审查人员
  addApprover(data) {
    // return request.post('/kjsf/approveUser/add', data)
    return request.post('/system/user/registerReview', data)
  },
  delApprover(id) {
    return request.post(`/kjsf/approveUser/delete/${id}`)
  },

}

export default approve;
